//
// Created by Administrator on 2025/9/3.
//

#ifndef INC_12_FREERTOS_LWIP_MQTT_NEWLAND_MODBUSRTU_TASK_H
#define INC_12_FREERTOS_LWIP_MQTT_NEWLAND_MODBUSRTU_TASK_H
#include "main.h"
#include "FreeRTOS.h"
#include "sensor_manager.h"

void modbus_master_task(void* args);
BaseType_t modbus_holding_regs_validate(uint8_t slave_addr,uint8_t start_addr,uint8_t reg_num,sensor_decode_formula_t formula, sensor_value_t *regs);
BaseType_t modbus_coil_reg_write_single(uint8_t slave_addr,uint8_t start_addr,sensor_value_t value);
BaseType_t modbus_holding_reg_write_single(uint8_t slave_addr,uint8_t start_addr,sensor_value_t value);
#endif //INC_12_FREERTOS_LWIP_MQTT_NEWLAND_MODBUSRTU_TASK_H